package com.work.straighttalk.model.i;

import android.net.Uri;

import com.work.straighttalk.StraightTalkPlayer;
import com.work.straighttalk.bean.StraightTalkMessage;
import com.work.straighttalk.presenter.i.OnIMSendListener;
import com.work.straighttalk.presenter.i.OnLoadFinishedListener;
import com.work.straighttalk.presenter.i.SeekBarMaxListener;

import java.util.List;


/**
 * 用于发消息的MI
 */
public interface ChatMI {
    //创建文本消息
    void sendTextMessage(String content, OnIMSendListener listener1);


    //查询本地数据库中的message
    void queryMessage(OnLoadFinishedListener<List<StraightTalkMessage>> listener);


    //删除一条数据
    void removeMessage();

    //播放语音

    /**
     * @param message        播放的音乐信息
     * @param listener       播放进度 监听
     * @param listener2      播放总长 调整监听
     * @param playerCallBack 播放监听
     */
    void playVoice(StraightTalkMessage message, SeekBarProgressListener listener, SeekBarMaxListener listener2, StraightTalkPlayer.PlayerCallBack playerCallBack);

    //暂停播放音乐
    void pauseVoice();

    //录音存储
    void recordVoice();

    //抛弃录音
    void discardVoice();

    //结束录音 并发送

    /**
     * 发送信息后 回调 将发送后的信息列表传回
     *
     * @param listener
     */
    void sendVoiceMessage(OnIMSendListener listener);

    //控制音频播放进度

    /**
     * @param progress 进度值
     */
    void seekTo(int progress);

    /**
     *
     * @param uri
     * @param listener
     */
    void sendPicByUri(Uri uri, OnIMSendListener listener);
}
